#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int a = 0;
	int b = 1;
	scanf("%d", &a);
	while (a != 1)
	{
		b = a * b;
		a = a-1;
	}
	printf("%d", b);
	return 0;
}
